﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using INSTA.BankSystem.BLL;
using INSTA.BankSystem.DAL;

using INSTA.Library;

namespace INSTA.BankSystem.ConsoleUI
{
    public class Program
    {
        static void Main(string[] args)
        {
            //Test_ExtensionMethod_ToStringDetailed();
            Test_GenerateSQL_SELECT();
        }

        public static void Test_ExtensionMethod_ToStringDetailed()
        {
            var t = new TestObject()
                        {
                            Property_1 = "aa",
                            Property_2 = 123,
                            Property_3 = 456
                        };

            Console.WriteLine(t.ToStringDetailed() );
        }

        public static void Test_GenerateSQL_SELECT()
        {
            TestObject x = new TestObject()
                               {
                                   Property_1 = "Val1",
                                   Property_2 = 159,
                                   Property_3 = 2000,

                               };

            string selectString = x.DbAccessor.SqlGenerator.GenerateSqlFor_SELECT();
            Console.WriteLine(selectString);

            string deleteString = x.DbAccessor.SqlGenerator.GenerateSqlFor_DELETE();
            Console.WriteLine(deleteString);

            string updateString = x.DbAccessor.SqlGenerator.GenerateSqlFor_UPDATE();
            Console.WriteLine(updateString);

            string insertString = x.DbAccessor.SqlGenerator.GenerateSqlFor_INSERT();
            Console.WriteLine(insertString);
        }
    }
}
